<?php
	if (isset($_POST["enteremail"]))
	{
		include "../common/configdb.php";
		$link = mysql_connect(@constant('HOST_NAME'),@constant('USER_NAME'),@constant('PASS'));
		mysql_select_db(@constant('DB_NAME'));
		$SQLString = "SELECT * FROM ".DB_FIX."listemail WHERE email='".$_POST["enteremail"]."'";
		$result = mysql_query($SQLString);
		if (mysql_num_rows($result))
			echo $_POST["enteremail"];
		else
		{
			$SQLString = "INSERT INTO ".DB_FIX."listemail (email) VALUES ('".$_POST["enteremail"]."')";
			$result = mysql_query($SQLString);
			echo "ok";
		}
	}
?>